from datetime import datetime
from pydantic import BaseModel, Field


class DecoratePageSchema(BaseModel):
    id: int | None = Field(None, description="主键")
    page_type: int = Field(10, description="页面类型")
    page_name: str = Field("", description="页面名称")
    page_data: str = Field("", description="页面数据")
    created_time: datetime | None = Field(None, description="创建时间")
    updated_time: datetime | None = Field(None, description="更新时间")


class DecorateTabbarSchema(BaseModel):
    id: int = Field(description="主键")
    name: str = Field("", description="导航名称")
    selected: str = Field("", description="已选图标")
    unselected: str = Field("", description="未选图标")
    link: str = Field("", description="链接地址")
    created_time: datetime | None = Field(None, description="创建时间")
    updated_time: datetime | None = Field(None, description="更新时间")


class HotSearchSchema(BaseModel):
    id: int
    name: str
    sort: int | None = None
